/**
 * .emplace_back()示例
*/
#include <iostream>
#include <vector>
using namespace std;
class AA{
public:
    string name;
    int age;
    AA(string name_m,int age_t):name(name_m),age(age_t){
        cout<<"AA类的构造函数的使用"<<endl;
    }
};
template<typename T>
    void print(vector<T> A){
        for(int i=0;i<A.size();i++){
            cout<<A[i].name<<" ";
        }
        cout<<endl;
        for(int i=0;i<A.size();i++){
            cout<<A[i].age<<" ";
        }
    }
int main()
{
    vector<AA> a;
    a.emplace_back("涨三",19);
    a.emplace_back("李四",20);
    print<AA>(a);
    return 0;
}